﻿using System;
using NoMiddleman.Core.Domain;

namespace NoMiddleman.Core.Strategies
{
    public static class CostCalculatorFactory
    {
        public static ICostCalculator CreateCostCalculator(Advert advert)
        {
            if (advert is Sale) return new SaleCostCalculator();
            if (advert is Tenancy) return new TennancyCostCalculator();
            throw new NotImplementedException();
        }
    }
}